<template>
  <view class="historyDetailContainer">
      <web-view :src="outUrl"  :webview-styles="webviewStyles" ></web-view>
 
 
  </view>
</template>
<script>
 const app = getApp();
export default {
  data() {
    return {
      key:'',
      optionUrl:'',
      identity:'',
      code:'',
      outUrl:'',
      webviewStyles:{
      width: {
						color: '#FF3333'
					}
        }

    };
  },
  methods: {
 
  },
  onReady() {


  },

  onLoad: function (option) { //option为object类型，会序列化上个页面传递的参数
    console.log('跳转页面~~',option)
    console.log('电话号码~',app.globalData.phone)
    this.optionUrl = option.url
    if(option.identity){
      this.key = 'identity'
      this.identity = option.identity;
      this.outUrl = option.url+"?identity="+option.identity;
    }else if(option.code){
      this.key = 'code'
      this.outUrl = option.url+"?code="+option.code;
    }else if(option.id){
      this.key = 'id'
      this.outUrl = option.url+"?id="+option.id;
    }else if(option.ai){
      this.key = 'ai'
      this.outUrl = option.url+"?serialNumber=HZ2023111411031FVHM&appId=hz3sfw2321232412123&phone="+app.globalData.phone+"&tabActive=1&background=linear-gradient(%23FFECD9%2C%23F2F4F5)";
    }else if(option.paint){
      this.key = 'paint'
      this.outUrl = option.url+"?serialNumber=HZ20231118102502RMQ&appId=hz3sfw2321232412123&phone="+app.globalData.phone+"&tabActive=2&background=linear-gradient(%23FFECD9%2C%23F2F4F5)";
    }else if(option.video){
      this.key = 'video'
      this.outUrl = option.url+"?serialNumber=HZ20231118102418YRY&appId=hz3sfw2321232412123&phone="+app.globalData.phone+"&tabActive=4&background=linear-gradient(%23FFECD9%2C%23F2F4F5)";
    }else if(option.wid){
      this.key = 'wid'
      this.outUrl = option.url+"?wid="+option.wid+"&qcode="+option.qcode;
    }else if(option.gongzhonghao1){ 
      this.key = 'gongzhonghao1'
    
      this.outUrl = option.url+ '?__biz=MzkwOTQxODY2NQ==&mid=2247484221&idx=1&sn=4dfcea37d77e93315bc90247c8b4338c&chksm=c13a4afbf64dc3ed1a1e0398cae148e0599d505383ca7711ffe2de07219019156d7337fc7a62#rd';
    }else if(option.gongzhonghao2){
      this.key = 'gongzhonghao2'
      this.outUrl = option.url+ '?__biz=MzkwOTQxODY2NQ==&mid=2247484300&idx=2&sn=bdd5842ecb363916fe6a28cded02285f&chksm=c13a4a4af64dc35c80df0bdb6a5cb229897e170adccf9d985d53d5f53fd42561d670101432ee#rd';
    }else if(option.gongzhonghao3){
      this.key = 'gongzhonghao3'
      this.outUrl = option.url+ '?__biz=MzkwOTQxODY2NQ==&mid=2247484300&idx=3&sn=7162aead46bae4e24fce7b97337aaca3&chksm=c13a4a4af64dc35c9618a9980f8549e1de59d572bda8a97cb6caf5aec457565b21f937fa9f74#rd';
    }else if(option.gongzhonghao4){
      this.key = 'gongzhonghao4'
      this.outUrl = option.url+ '?__biz=MzkwOTQxODY2NQ==&mid=2247484300&idx=1&sn=f3a06ba46fc68d47065b03065e50b7a8&chksm=c13a4a4af64dc35c59eb956a83b63277844db40667245f3bcfa4501f51667d4aca4923c7aa87#rd';
    }else if(option.gongzhonghao5){
      this.key = 'gongzhonghao5'
      this.outUrl = option.url+ '?__biz=MzkwOTQxODY2NQ==&mid=2247484300&idx=3&sn=7162aead46bae4e24fce7b97337aaca3&chksm=c13a4a4af64dc35c9618a9980f8549e1de59d572bda8a97cb6caf5aec457565b21f937fa9f74#rd';
    }else if(option.gongzhonghao6){
      this.key = 'gongzhonghao6'
      this.outUrl = option.url+ '?__biz=MzkwOTQxODY2NQ==&mid=2247484321&idx=1&sn=d92f3b2ef6ce64a5df75e505215d9084&chksm=c13a4a67f64dc3715fae5606a646fb3ca8fda9c729db826217c0fd0a8755d982b094bf50914e#rd';
    }else if(option.gongzhonghao7){
      this.key = 'gongzhonghao7'
      this.outUrl = option.url+ '?__biz=MzkwOTQxODY2NQ==&mid=2247484338&idx=1&sn=2b5d641831c2240eaf59e5c9caefa88f&chksm=c13a4a74f64dc362bc31a01dea9f15f8702f7ebbf6c14b372d7d230963eea0cbfade286519be#rd';
    }else if(option.exhibition){
      this.key = 'exhibition'
      this.outUrl = option.url ;
    }
    else {
      this.outUrl = option.url;
    }
    
    console.log('跳转页面~~1111',this.outUrl)

    // uni.showShareMenu({
    //             withShareTicket: true,
    //             menus: ['shareAppMessage', 'shareTimeline']
    //   })




  },
 
		 
 
 
  onShareAppMessage(res) {
    let _path
    if(this.key == 'gongzhonghao1'||this.key == 'gongzhonghao2'||this.key == 'gongzhonghao3'||this.key == 'gongzhonghao4'||this.key == 'gongzhonghao5'||this.key == 'gongzhonghao6'||this.key == 'gongzhonghao7'){
      _path = `/page_webView/webView?url=${this.optionUrl}&${this.key}=true`
    }else if(this.key == 'exhibition') {
      _path =  `/page_webView/webView?url=${this.optionUrl}`
    }else {
      
      _path = '/pages/index/index'
    } 
		return {
			title: '万联数字创新平台',
			path: _path,
		}
	}
};

</script>

<style lang="scss">
 
 
 

 
 

 
</style>
